package io.renren.modules.generator.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.generator.dao.TeTeacherDao;
import io.renren.modules.generator.entity.TeTeacherEntity;
import io.renren.modules.generator.service.TeTeacherService;


@Service("teTeacherService")
public class TeTeacherServiceImpl extends ServiceImpl<TeTeacherDao, TeTeacherEntity> implements TeTeacherService {

    @Autowired
    TeTeacherDao teTeacherDao;

    @Override
    public List<TeTeacherEntity> getAll() {
        return teTeacherDao.getAll();
    }

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TeTeacherEntity> page = this.page(
                new Query<TeTeacherEntity>().getPage(params),
                new QueryWrapper<TeTeacherEntity>()
        );
        return new PageUtils(page);
    }

}